<?php
if (!defined('BASEPATH'))
    exit('no direct script allowed asshole!!');
$this->load->helper('html');
?>


<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>

<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />


<div id="container">
    <fieldset class="fieldset">
        <legend class="legend">|Detail Data Santri|</legend>

        <div id="contentform" style="border:solid thin #BBBBBB; height:350px; background-color:#F9F9F9; -moz-border-radius: 5px;  padding-top:10px; padding-bottom:0.3px; margin-right:100px; margin-left:100px;">

            <!-- Start value -->
            <?
            //Setting Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
            $value = array(
                'id_santri' => "",
                'munakosah' => "",
                'nama_santri' => "",
                'asal_santri' => "",
                'telpon_santri' => "",
				'tempat_lahir' => "",
				'tanggal_lahir' => "",
				'id_jk' => "",
				'id_status' => "",
				'id_pendidikan' => "",
				'pekerjaan_santri' => "",
				'instansi' => "",
				'jabatan' => "",
				'alamat_perusahaan' => "",
				'tanggal_pendaftaran' => "",
                'foto_santri' => "",
                'act_form' => "santri/upload/"
            );
			

            //Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
            if ($status == "detail_santri") {
                $value['id_santri'] = $id_santri;
                $value['munakosah'] = $munakosah;
                $value['nama_santri'] = $nama_santri;
                $value['asal_santri'] = $asal_santri;
                $value['telpon_santri'] = $telpon_santri;
				$value['tempat_lahir'] = $tempat_lahir;
				$value['tanggal_lahir'] = $tanggal_lahir;
				$value['id_jk'] = $id_jk;
				$value['id_status'] = $id_status;
				$value['id_pendidikan'] = $id_pendidikan;
				$value['pekerjaan_santri'] = $pekerjaan_santri;
				$value['instansi'] = $instansi;
				$value['jabatan'] = $jabatan;
				$value['alamat_perusahaan'] = $alamat_perusahaan;
				$value['tanggal_pendaftaran'] = $tanggal_pendaftaran;
                $value['foto_santri'] = $foto_santri;
                $value['disable'] = 'disabled = "disabled"';
				$value['act_form'] = "santri/edit/" . $value['id_santri'];
                }//end if
            ?>

            <?= form_open_multipart($value["act_form"]); ?>
           
            <!-- End value -->

            <table width="847" border="0" bordercolor="#F0F0F0">
                <tr>
                    <td width="905" height="150">
                        <form id="form1" name="form1" method="post">
                            <div align="center">
                                <table width="850" border="0">
                                    <tr>
                                        <td width="80">No Induk</td>
                                        <td width="280">: <?= $value['munakosah'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Nama Santri</td>
                                        <td width="280">: <?= $value['nama_santri'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Alamat</td>
                                        <td width="208">: <?= $value['asal_santri'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Telpon/HP</td>
                                        <td width="208">: <?= $value['telpon_santri'] ?></td>
                                    </tr>
                                    <tr>
                                        <td width="80">Tempat Lahir</td>
                                        <td width="208">: <?= $value['tempat_lahir'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Tanggal Lahir</td>
                                        <td width="208">: <?= $value['tanggal_lahir'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Jenis Kelamin</td>
                                        <td width="208">: <?= $value['id_jk'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Status</td>
                                        <td width="208">: <?= $value['id_status'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Pendidikan</td>
                                        <td width="208">: <?= $value['id_pendidikan'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Pekerjaan</td>
                                        <td width="208">: <?= $value['pekerjaan_santri'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Instansi / Perusahaan</td>
                                        <td width="208">: <?= $value['instansi'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Jabatan</td>
                                        <td width="208">: <?= $value['jabatan'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Alamat Perusahaan</td>
                                        <td width="208">: <?= $value['alamat_perusahaan'] ?></td>
                                    </tr>
									<tr>
                                        <td width="80">Tanggal Pendaftaran</td>
                                        <td width="208">: <?= $value['tanggal_pendaftaran'] ?></td>
                                    </tr>
									<?
                                    if ($status == "detail_santri") {
                                        echo '
                                            <tr>
                                            <td width="80">&nbsp;</td>
                                            <td width="208"> <img src='.$foto_santri.' width="150" height="150"></td>
                                            </tr>

                                            
                                        ';
										// <tr>
                                            // <td>Ganti foto</td>
                                            // <td><input type="file" name="foto_santri" size="30"/></td>
                                            // <td></td>
                                            // </tr>
                                    } else {
                                        echo'
                                        <tr>
                                        <td>Foto</td>
                                        <td><input type="file" name="foto_santri" size="30"/></td>
                                        </tr>
                                        ';
                                    }
                                    ?>
									<tr>
                                        <td height="28">&nbsp;</td>
                                        <td>
                                            <div align="left">
                                                <input type="submit" name="Submit" value="Edit" />
												<a href="<?php echo site_url('santri/index') ?>">
												<input type="button" value="Kembali" />
												</a>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </form>
                        <p align="center">&nbsp;</p></td></tr>
            </table>
        </div>
        <p>&nbsp;</p>
    </fieldset>
</div>
<p>
    <!--container-->
</p>
<p>&nbsp; </p>

